package ${serviceImplPackgeName};
import ${modelClassName}
import ${serviceImplClassName}
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xiecang.model.dto.MsgBean;

/**
 *
 *  ${note} 服务层实现类
 *  @author ${author}
 *
 */
@Service
public class ${className}${service?cap_first}${impl?cap_first} implements ${className}${service?cap_first}{
	
	@Autowired
	private ${className}${mapper?cap_first} ${className?uncap_first}${mapper?cap_first};

	/**
	 *
	 * 查询${note}信息列表
	 * @Param ${className} 对象信息{@link ${modelPackgeName}}
	 *
	 */
	 
	@Override
	public MsgBean queryEntityList(Integer currentPage,Integer pageSize){
		List<${className}> ${className?uncap_first}List = ${className?uncap_first}${service?cap_first}.queryEntityList(currentPage,pageSize);
		return new MsgBean(Code.SUCCESS, "获取列表成功", MsgLevel.NORMAL).setData(${className?uncap_first}List);
	}
	
	/**
	 *
	 * 保存${note}信息
	 * @Param ${className} 对象信息{@link ${modelPackgeName}}
	 *
	 */
	 
	@Override
	public MsgBean saveEntity(${className} ${className?cap_first}){
		this.save(${className} ${className?cap_first});
		return new MsgBean(Code.SUCCESS, "保存成功", MsgLevel.NORMAL);
	}
	
	/**
	 *
	 * 保存${note}信息
	 * @Param ${className} 对象信息{@link ${modelPackgeName}}
	 *
	 */
	 
	@Override
	public Integer save(${className} ${className?cap_first}){
		Integer count = ${className?uncap_first}${mapper?cap_first}.save(${className?cap_first});
	}
	
	/**
	 *
	 * 更新${note}信息
	 * @Param ${className} 对象信息{@link ${modelPackgeName}}
	 *
	 */
	 
	@Override
	public MsgBean updateEntity(${className} ${className?cap_first}){
		this.update(${className} ${className?cap_first});
		return new MsgBean(Code.SUCCESS, "保存成功", MsgLevel.NORMAL);
	}
	
	/**
	 *
	 * 更新${note}信息
	 * @Param ${className} 对象信息{@link ${modelPackgeName}}
	 *
	 */
	 
	@Override
	public Integer update(${className} ${className?cap_first}){
		Integer count = ${className?uncap_first}${mapper?cap_first}.update(${className?cap_first});
	}
	
	/**
	 *
	 * 删除指定${note}信息
	 * @Param Long id ${note}对象ID
	 *
	 */
	 
	@Override
	public MsgBean del(Long id){
		Integer count = ${className?uncap_first}${mapper?cap_first}.del(${className?cap_first});
	}
	
}